<?php
include ("headerforsuggestion.php");
 include('databaseconnection.php');
 $query = "SELECT * FROM suggestions WHERE term LIKE 'b%' or term LIKE 'B%'";   
$result = mysql_query($query);

if (mysql_num_rows($result) >= 1) 
  {
  echo "<table border='1'  cellspacing='1' cellpadding='2'  align='left' width='100%'>
<tr>
<th>Term</th>
<th>Domain</th>
<th>Language</th>
<th>Suggested Meaning</th>
<th>Status</th>
<th>Suggested Date</th>

<th>Likes</th>
<th>Votes</th>
<th>Add Comments/More</th>

</tr>";
while($row=mysql_fetch_array($result))
{

echo "<form action='updateSuggestionComment.php' method='POST'>";
echo "<tr>";
$term=$row['term'];
echo "<td width='15%'>".$row['term']."<input type='hidden' name='butt' value='$term'</td>";

echo "<td width='15%'>".$row['domain']."</td>";

echo "<td width='15%'>".$row['language']."</td>";
$sugg=$row['suggestion'];
echo "<td width='20%'>".$row['suggestion']."<input type='hidden' name='butt1' value='$sugg'</td>";
echo "<td width='12%'>".$row['status']."</td>";
echo "<td width='10%'>".$row['suggested_date']."</td>";
//echo "<td width='10%'>".$row['suggested_by']."</td>";
echo "<td width='3%'><a href='Suggestion.php'>like</a></td>";
echo "<td width='5%'>".$row['votes']."</td>";
//echo "<td width='16%'>".$row['comments']."</td>";


//echo "<td width='9%'><textarea rows='1' cols='9' name='comm'></textarea><input type='submit' name='$term' value='add comment'/><input type='hidden' name='butt' value='$term'</td>";


echo "<td width='5%'><input type='submit' name='$term' value='More'/></td>";
echo "</tr>";
echo "</form>";
}
echo "</table>";
}
else
{
 echo   "<table width='960px' height='82' border='1' class='table' align='left'>";
   echo "<tr><td>No Suggestions for your Search</a></td></tr>";
   echo "</table>";
}
include ("footer.php");







?>




